<script>

YUI().use('datasource-io','datasource-jsonschema','datatable-datasource','datatable-scroll','datatable-sort', function(Y){
  var log = new Y.DataTable.Base({
    columnset: [{key: "StartTime", label: "Time (UTC)", sortable: true},
                {key: "Duration", label: "Duration"},
		{key: "XmtType", label: "TX Type", sortable:true},
		{key: "DestRptr", label: "RPT2", sortable:true},
		{key: "SrcRptr", label: "RPT", sortable:true},
		{key: "DestStn", label: "UR CALL", sortable:true},
		{key: "SrcStn", label: "MY CALL", sortable: true},
		{key: "SrcStnExt", label: "Message"}		
               ],
    
  });

  var log_ds = new Y.DataSource.IO({ source: "webservice/main.cgi?method=get_log"});
  log_ds.plug(Y.Plugin.DataSourceJSONSchema, {
    schema: {
      resultListLocator: "results",
      resultFields: ["StartTime","Duration","XmtType","DestRptr","SrcRptr","DestStn","SrcStn","SrcStnExt"]
    }});
  log_ds.sendRequest({
    callback:{
      success: function(e){
        Y.log(e);
      }
    }
  });

  //log.plug(Y.Plugin.DataTableSort);

  log.plug(Y.Plugin.DataTableScroll,{
    height: "600px"
  });

  log.plug(Y.Plugin.DataTableDataSource,{
    datasource: log_ds
  }).render("#log");

  log.datasource.load();

});

</script>

<br><br>
<div style="width: 99%">
 <center><h1>Log of All Activity</h1>  <div id="log" style="width: 99%"></div> </center>
</div>
<br><br>
